package cn.biplam.front.htmlscript.script;

import cn.biplam.front.htmlscript.script.AjxScript.Level;

/**
 * 页面布局脚本模版
 * @author XiaoRuxing 2009-6-5下午02:50:13
 * @version 1.0
 */
public class LayoutScript {
	
	/**
	 * 	绑定指定脚本到指定对象的父对象的resize事件 
	 * @param sObjectID 当前对象ID
	 * @param script    脚本命令
	 * @return	String
	 */
	public static String bindToParentResize(String sObjectID,String script){
		StringBuilder sb=new StringBuilder();
		sb.append("$('"+sObjectID+"').offsetParent.onresize=");
		sb.append("function(){");
		sb.append(script);
		sb.append("};");
		return sb.toString();
	}
	
	/**
	 * 显示并刷新Prompt窗口的脚本
	 * @return	String
	 */
	public static String PromptShow(){
		return "promptShow('prompt');";
	}
	
	public static String PopupShow(Level level){
		return "popupShow('syspop"+level+"');";
	}
}
